package com.example.zuoye.mvp.presenter;

import com.example.mylibrary.mvp.model.IModel;
import com.example.mylibrary.mvp.presenter.BasePresenter;
import com.example.mylibrary.mvp.view.IView;
import com.example.zuoye.bean.TagTravel;
import com.example.zuoye.bean.UserBean;
import com.example.zuoye.mvp.model.MainModel;
import com.example.zuoye.mvp.view.MainActivity;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public class MainPresenter extends BasePresenter<MainModel, MainActivity>{
    public MainPresenter(MainModel mModel, MainActivity mView) {
        super(mModel, mView);
    }

    public void requestTag(){
        mModel.request(new Observer<List<UserBean>>() {
            @Override
            public void onSubscribe(Disposable d) {

            }

            @Override
            public void onNext(List<UserBean> list) {
                mView.initAdapter(list);
            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onComplete() {

            }
        });
    }

}
